<template>
  <view class="p1756173192">
    <view class="f jcsb pt30">
      <view class="c898989 wsnowrap">期望时间</view>
      <view class="f s1755925462">
        <template v-if="orderForm.is_pick_up_immediately == 1">
          <view v-if="(orderForm.type == 1 || orderForm.type == 2)">立即取件</view>
          <view v-if="(orderForm.type == 4 || orderForm.type == 5)">及时上门</view>
          <view v-if="orderForm.type == 3">立即配送</view>
        </template>
        <view class="fac" v-if="orderForm.type != 3 && orderForm.is_pick_up_immediately != 1">{{orderForm.deliver_date
          || ''}}
          <view class="pl20">{{orderForm.deliver_time || ''}}</view>
        </view>
      </view>
    </view>
    <view v-if="orderForm.type == 3" class="f p1755930345 jcsb pt30">
      <view class="c898989  wsnowrap">购买地址</view>
      <view v-if="orderForm.purchase_address_type == 1" class="p1755930006">{{orderForm.purchase_shop_address || ''}}
      </view>
      <view v-if="orderForm.purchase_address_type == 2">就近购买</view>
    </view>
    <view v-if="(orderForm.type == 1 || orderForm.type == 2)" class="f p1755930345 jcsb pt30">
      <view class="c898989  wsnowrap">取件地址</view>
      <view class="s1755925462 p1755930006">
        <view class=" ">{{orderForm.pickup_address_storey ||
          ''}}
          <div class="pl20" v-if="orderForm.pickup_address_house_number" style="display: inline;">
            {{orderForm.pickup_address_house_number || ''}}</div>
        </view>
        <view style="text-align: right;" class=" ">{{
          orderForm.pickup_address_name || ''}}&nbsp;
          &nbsp;{{orderForm.pickup_address_tel || ''}}</view>
      </view>
    </view>
    <view v-if="(orderForm.type == 1 || orderForm.type == 2)" class="f  jcsb p1755930345   pt30 ">
      <view class="c898989  wsnowrap">取件码</view>
      <view class="p1755930006">{{orderForm.pick_up_code || ''}}</view>
    </view>
    <view class="f p1755930345 jcsb pt30">
      <view class="c898989  wsnowrap">{{orderForm.type == 4 || orderForm.type == 5 ? '服务地址' : '配送地址'}}</view>
      <view class="s1755925462 p1755930006">
        <view class=" ">{{ orderForm.delivery_address_storey || ''}}
          <div class="pl20" v-if="orderForm.delivery_address_house_number" style="display: inline;">
            {{orderForm.delivery_address_house_number || ''}}</div>

        </view>
        <view style="text-align: right;" class=" ">{{orderForm.delivery_address_name || ''}}&nbsp;
          &nbsp;{{orderForm.delivery_address_tel || ''}}</view>
      </view>
    </view>
    <view class="f bb jcsb p1755930345 pb30  pt30 ">
      <view class="c898989  wsnowrap">备注信息</view>
      <view class="p1755930006">{{orderForm.remarks || ''}}</view>
    </view>
    <view class="f jcsb pt30   pb30">
      <view class="c898989 wsnowrap">配送服务</view>
      <view>邻事通跑腿服务</view>
    </view>
    <!-- <view class="f jcsb pb30" >
      <view class="c898989 wsnowrap">配送骑手</view>
      <view v-if="orderForm.neighbor_worker">{{orderForm.neighbor_worker && orderForm.neighbor_worker.real_name || ''}}
      </view>
    </view> -->
    <view v-if="(orderForm.status == 2 || (orderForm.neighbor_worker && orderForm.neighbor_worker.real_name) ) && orderForm.service_status != 0" class="f jcsb pb30">
      <view class="c898989 wsnowrap">配送骑手</view>
      <view class="fac" @click="riderTap">
        {{orderForm.neighbor_worker && orderForm.neighbor_worker.real_name || '配送骑手'}}
        <uv-icon v-if="orderForm.neighbor_worker_id" size="38rpx" color="#C9CACA" name="arrow-right"></uv-icon>
      </view>
    </view>
    <view class="f jcsb bt pb30  pt30">
      <view class="c898989 " style="white-space: nowrap;">订单号码</view>
      <view style="justify-content: flex-end;" class="fac p1755930006">
        <view style="text-align: right;" v-if="orderForm.order_no" @click="handleCopy(orderForm.order_no)" class="fz24 p1756085640">复制</view>
        {{orderForm.order_no || ''}}
      </view>
    </view>
    <view class="f jcsb  pb30 ">
      <view class="c898989 wsnowrap">下单时间</view>
      <view>{{orderForm.create_time || ''}}</view>
    </view>
    <view class="f jcsb pb30  ">
      <view class="c898989 wsnowrap">支付方式</view>
      <view>{{orderForm.pay_name || ''}}</view>
    </view>
    <view
      v-if="(orderForm.type == 1 ||  orderForm.type == 2) && (orderForm.status == 2 && orderForm.service_status != 0)"
      class="f bt jcsb pb30 pt30">
      <view class="c898989 wsnowrap">跑腿费</view>
      <view>{{orderForm.order_price || ''}}</view>
    </view>
    <view v-if="orderForm.type == 1 || orderForm.type == 2" class="f bt jcsb   pt30">
      <view class="c898989 wsnowrap">实付款</view>
      <view class="f " style="align-items: baseline;">
        <view>¥</view>
        <view class="fz32">{{orderForm.order_price || ''}}</view>
      </view>
    </view>
  </view>
</template>
<script>
  export default {
    props: {
      orderForm: {
        type: Object,
        default: () => { }
      }
    },
    data() {
      return {
      }
    },
    onReady(e) {
    },
    onLoad(options) {
    },
    onShow() {
    },
    methods: {
      riderTap() {
        uni.navigateTo({ url: '/pages-worker/rider?id=' + this.orderForm.neighbor_worker_id });
      },
      handleCopy(content) {
        uni.setClipboardData({
          data: content,
          success: () => {
            uni.showToast({
              title: '复制成功',
              icon: 'none',
              duration: 2000,
            });
          },
          fail: (err) => {
            uni.showToast({
              title: '复制失败',
              icon: 'none',
              duration: 2000,
            });
            console.error('复制失败原因：', err);
          },
        });
      },
    }
  }
</script>

<style lang="scss" scoped>
@import '../common.scss';
  .p1756173192 {
    .fz40 {
      font-size: 40rpx;

    }

    .wsnowrap {
      width: 180rpx;
      white-space: nowrap;
    }

    .bt {
      border-top: 2rpx solid #efefef;

    }

    .bb {
      border-bottom: 2rpx solid #efefef;

    }

    .mb40 {
      margin-bottom: 40rpx;
    }

    .c898989 {
      color: #898989
    }

    .p1755930006 {
      width: 76vw;
      text-align: right;
      word-break: break-all;
    }

    .p1756085640 {
      padding: 3rpx 10rpx;
      border-radius: 50rpx;
      border: 2rpx solid #C9CACA;
      white-space: nowrap;
      
    }

  }
</style>